package com.bawei.lizhiyu1228.mvp.v;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import com.bawei.lizhiyu1228.mvp.p.BasePresenter;

import org.jetbrains.annotations.NotNull;

/**
 * @author : zhiyu
 * @date : 2021/12/28
 * @content :
 */
public abstract class BaseFragment<P extends BasePresenter> extends Fragment implements IFragment {
    private View view;

    @Nullable
    @org.jetbrains.annotations.Nullable
    @Override
    public View onCreateView(@NonNull @NotNull LayoutInflater inflater, @Nullable @org.jetbrains.annotations.Nullable ViewGroup container, @Nullable @org.jetbrains.annotations.Nullable Bundle savedInstanceState) {
        return view=inflater.inflate(beanLayout(),container,false);
    }

    @Override
    public void onViewCreated(@NonNull @NotNull View view, @Nullable @org.jetbrains.annotations.Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        initView();
        initData();
    }
}
